﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FlashCards.Model;

namespace FlashCards.WebApp.Models
{
    public class GroupFlashcardsModel
    {
        public GroupFlashcardsModel(Group group, List<FlashcardSet> sets, string userPrivilege, int userId)
        {
            Group = new GroupModel(group);
            FlashcardSets = new List<FlashcardSetModel>();

            foreach (var item in sets)
                FlashcardSets.Add(new FlashcardSetModel(item));

            UserPrivilege = userPrivilege;
            UserId = userId;
        }

        public GroupModel Group { get; set; }
        public List<FlashcardSetModel> FlashcardSets { get; set; }
        public string UserPrivilege { get; set; }
        public int UserId { get; set; }
    }
}